package com.jiliason.segmentation.constant.enums;

public enum Addr {
    /**
     * master 字段
     */
    PROV_NAME("省份", "provName", 0),
    CITY_NAME("城市", "cityName", 1),
    DIST_NAME("区县", "distName", 2),
    TOWN_NAME("乡镇", "townName", 3),
    ROAD("路", "road", 4),
    POI_STR("POI名称", "poiStr", 5),
    ROAD_DETAIL("描述路的辅助字段master系", "roadDetail", 6),
    POI_DETAIL("描述poi的辅助字段master系", "poiDetail", 7),
    OTHER("不能拆分的部分", "other", 8),
    // ----
    FILED_SIZE("记录主字段总数", "无", 9),

    /**
     * sub 字段
     */
    PROV_TYPE("省份类型", "provType", 0),
    CITY_TYPE("城市类型", "cityType", 1),
    DIST_TYPE("区县类型", "distType", 2),
    TOWN_TYPE("乡镇类型", "townType", 3),
    ROAD_TYPE("路类型", "roadType", 4),
    POI_STR_TYPE("POI名称类型", "poiType", 5),


    /**
     * 可能废弃
     */
    ROAD1("第一条路", "road1", 99),
    ROAD2("第二条路", "road2", 99),
    ROAD_DETAIL_BRANCH("描述路的辅助字段master系", "roadDetailBranch", 8),
    ;

    private final String desc;
    private final String addrField;
    private final int index;

    Addr(String desc, String addrField, int index) {
        this.desc = desc;
        this.addrField = addrField;
        this.index = index;
    }

    public String v() {
        return this.addrField;
    }
    public int i() {
        return this.index;
    }
}
